
<?php

include ('../../Connections/KRAPPERCON.php');
  
if (getParam('idArt','')!=''){
	
	$json='';
	$idArt='';
	$sql="call usp_getDatosArt('". clearChar(getParam('idArt',''))."')";
	$res = $mysqli->query($sql);
	$resmsg=mysqli_error($mysqli);
	
	 if($res && trim($resmsg)==''){	
               
		while($row = $res->fetch_assoc()){
		      	
			   $idArt=$row['ArticuloID'];
	           $json.="{";
                   
				   $json.="ArticuloID:'".$row['ArticuloID']."',";   
                   $json.="ArticuloName:'".$row['ArticuloName']."',";   
                   $json.="ArticuloDesc:'".$row['ArticuloDesc']."',";
                   $json.="ArticuloCos:'".$row['ArticuloCos']."',";
                   $json.="ArticuloPre:'".$row['ArticuloPre']."',";
                   $json.="ArticuloDsc1:'".$row['ArticuloDsc1']."',";
                   $json.="ArticuloDsc2:'".$row['ArticuloDsc2']."'";
                   
                   $json.="}";
				
		}
		
		$res->close();
		$mysqli->next_result();
		if (trim($idArt)==''){
		  echo '<ul class="errores"><li> No se encontro al Articulo </li></ul>';  	 
		}else{
		  echo $json;	
		}
		
	 }
	 
	 if( trim($resmsg)!='') {
		  echo '<ul class="errores"><li>'.$resmsg.'</li></ul>'; 
	 }
}else{
   echo '<ul class="errores"><li> No ha ingresado Id del Articulo </li></ul>'; 
}



?>


